$(function() {
	$(".btnAst").button();

	/**
	 * 展开
	 */
	var $btnShow = $("#btnShow");
	var $pnlExpand = $("#pnlExpand");

	var setBtnShow = function(flag) {
		if (!flag) {
			$btnShow.button({
						label : "展开",
						icons : {
							primary : "ui-icon-arrowthickstop-1-s",
							secondary : "ui-icon-arrowthickstop-1-s"
						}
					});
		} else {
			$btnShow.button({
						"label" : "关闭",
						icons : {
							primary : "ui-icon-arrowthickstop-1-n",
							secondary : "ui-icon-arrowthickstop-1-n"
						}
					});
		}
	};

	setBtnShow();
	$btnShow.toggle(function() {
				$pnlExpand.show();
				setBtnShow(true);
			}, function() {
				$("#pnlExpand").hide();
				setBtnShow(false);
			});
});